package com.yixing.tech.wcs.constant;

public enum RCSTaskTypEnum {
    OUT_BOUND("出库", DictId.TaskType.STOCK_OUT, RCSConstant.TaskTemplate.CTU_OUT_BOUND),
    IN_BOUND("入库", DictId.TaskType.STOCK_IN, RCSConstant.TaskTemplate.CTU_IN_BOUND),
    MOVING("移库", DictId.TaskType.MOVING, RCSConstant.TaskTemplate.CTU_TRANSPORT);

    private final String name;
    private final String taskTypeCode;
    private final String templateCode;

    RCSTaskTypEnum(String name, String taskTypeCode, String templateCode) {
        this.name = name;
        this.taskTypeCode = taskTypeCode;
        this.templateCode = templateCode;
    }

    public static RCSTaskTypEnum getByTaskTypeCode(String taskTypeCode) {
        for(RCSTaskTypEnum rcsTaskTypEnum: RCSTaskTypEnum.values()) {
            if(rcsTaskTypEnum.taskTypeCode.equals(taskTypeCode))
                return rcsTaskTypEnum;
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public String getTaskTypeCode() {
        return taskTypeCode;
    }

    public String getTemplateCode() {
        return templateCode;
    }
}
